import service from "../config";

// 课程列表
export function fetchCourses(params = {}) {
    return service({
        url: "/schedule/courses/",
        method: "GET",
        params
    });
}

// 创建课程
export function createCourse(data) {
    return service({
        url: "/schedule/courses/",
        method: "POST",
        data
    });
}

// 今日课程
export function fetchTodayCourses() {
    return service({
        url: "/schedule/courses/today/",
        method: "GET"
    });
}

// 清空课程
export function clearCourses() {
    return service({
        url: "/schedule/courses/clear_all/",
        method: "DELETE"
    });
}
